package com.javaspeak.designpatterns.go4.structural.bridge;

/**
 * This class extends the AbstractShapeBridge and adds functionality.
 * <p>
 * The added functionality is a drawShape() method
 *
 * @author John Dickerson
 */
public class ShapeBridgeImpl extends AbstractShapeBridge {

    /**
     * Constructor
     */
    public ShapeBridgeImpl(){

        super( new TriangleBuilder() );
    }


    /**
     * Provides additional method which application can call.
     * <p>
     * Extends functionality of AbstractShapeBridge
     */
    public void drawShape(){

        System.out.println(
                "Drawing a Shape using " + this.shapeBuilder.toString() );

        this.buildShape().draw();
    }
}
